<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="transactionEntryDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='transactionEntryDetail.heading'/>"/>
</head>

<s:form id="transactionEntryForm" action="saveTransactionEntry" method="post" validate="true">
    <li style="display: none">
        <s:hidden key="transactionEntry.id"/>
    </li>
    <s:textfield key="transactionEntry.clientId" required="true" maxlength="255" cssClass="text medium"/>
<li>
    <s:checkbox key="transactionEntry.clientupdated" cssClass="checkbox" theme="simple"/>
    <!-- For some reason, key prints out the raw value for the label (i.e. true) instead of the i18n key: https://issues.apache.org/struts/browse/WW-1958-->
    <s:label for="transactionEntryForm_transactionEntry_clientupdated" value="%{getText('transactionEntry.clientupdated')}" cssClass="choice desc" theme="simple"/>
</li>
    <s:textfield key="transactionEntry.deadline" required="true" maxlength="19" cssClass="text medium"/>
    <s:textfield key="transactionEntry.editorId" required="true" maxlength="255" cssClass="text medium"/>
<li>
    <s:checkbox key="transactionEntry.editorupdated" cssClass="checkbox" theme="simple"/>
    <!-- For some reason, key prints out the raw value for the label (i.e. true) instead of the i18n key: https://issues.apache.org/struts/browse/WW-1958-->
    <s:label for="transactionEntryForm_transactionEntry_editorupdated" value="%{getText('transactionEntry.editorupdated')}" cssClass="choice desc" theme="simple"/>
</li>
    <s:textfield key="transactionEntry.finishTime" required="false" maxlength="19" cssClass="text medium"/>
<li>
    <s:checkbox key="transactionEntry.finished" cssClass="checkbox" theme="simple"/>
    <!-- For some reason, key prints out the raw value for the label (i.e. true) instead of the i18n key: https://issues.apache.org/struts/browse/WW-1958-->
    <s:label for="transactionEntryForm_transactionEntry_finished" value="%{getText('transactionEntry.finished')}" cssClass="choice desc" theme="simple"/>
</li>
    <s:textfield key="transactionEntry.payment" required="true" maxlength="255" cssClass="text medium"/>
    <s:textfield key="transactionEntry.schoolNum" required="false" maxlength="255" cssClass="text medium"/>
    <s:textfield key="transactionEntry.serviceId" required="true" maxlength="255" cssClass="text medium"/>
    <s:textfield key="transactionEntry.startTime" required="true" maxlength="19" cssClass="text medium"/>
    <s:textfield key="transactionEntry.step" required="false" maxlength="255" cssClass="text medium"/>
    <s:textfield key="transactionEntry.transactionId" required="true" maxlength="255" cssClass="text medium"/>

    <li class="buttonBar bottom">
        <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
        <c:if test="${not empty transactionEntry.id}">
            <s:submit cssClass="button" method="delete" key="button.delete"
                onclick="return confirmDelete('TransactionEntry')" theme="simple"/>
        </c:if>
        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
    </li>
</s:form>

<script type="text/javascript">
    Form.focusFirstElement($("transactionEntryForm"));
</script>
